<?php include dirname(__FILE__).'/common/header.php'; ?>

<?php include dirname(__FILE__).'/common/menu.php'; ?>

var attr = {};
attr.ctrlName = '<?php echo $ctrlName ?>';

/*
| -------------------------------------------------------------------
|  List Grid
| -------------------------------------------------------------------
*/
list.grid = new ZM.FormPanel({
    url : list.baseUrl + attr.ctrlName+'/noteQuanity',
    keySubmit:true,
    region:'center',
    buttonAlign:'left',
    buttons:null,
    labelWidth:150,
    defaults:{xtype:'textfield',width:400},
    fileUpload:true,
    success:function(res) {
        ZM.resetForm(list.grid);
        Ext.Msg.alert('操作成功', '记录成功！可在阅读量排名里看查看!');
    },
    items:[{
        xtype:'intfield',
        fieldLabel:'阅读量',
        name:'quanity',
        allowBlank:false
    },{
        fieldLabel:'图片',
        inputType:'file',
        name:'image_path',
        allowBlank:false
    },{
        xtype:'button',
        text:'提交',
        hidden:!Ext.permission[attr.ctrlName+'/noteQuanity'.toLowerCase()],
        style:'margin:20px 0 0 155px;',
        width:70,
        handler:function() {ZM.submitForm(list.grid);}
    }]
});

<?php include dirname(__FILE__).'/common/layout.php'; ?>
<?php include dirname(__FILE__).'/common/footer.php'; ?>
